package com.imooc.common.utils;

import com.imooc.common.constants.ResultCodeConstants;
import com.imooc.common.exception.ExceptionUtil;
import com.imooc.common.result.AbstractResponse;


/**
 * @ClassName: ExceptionProcessorUtils
 * @Description:
 * @author: limingxing
 * @Date: 2019-12-23 16:26
 */
public class ExceptionProcessorUtils {

    public static void wrapperHandlerException(AbstractResponse response, Exception e){
        try {
            ExceptionUtil.handlerException4biz(response,e);
        } catch (Exception ex) {
            response.setCode(ResultCodeConstants.SYSTEM_ERROR.getCode());
            response.setMsg(ResultCodeConstants.SYSTEM_ERROR.getMessage());
        }
    }
}
